﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Traceability.Domain.FarmingMsgs;
using Traceability.Domain.Goodss;
using Traceability.Domain.Ingredients;
using Traceability.Domain.Machinings;
using Traceability.Domain.Slaughters;
using Traceability.Util;

namespace Traceability.Services.GoodServices
{
    /// <summary>
    /// 产品服务接口
    /// </summary>
    public interface IProductService
    {
        /// <summary>
        /// 获取产品列表
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <returns></returns>
        Task<APIResult<PageIng<ProductDto>>> GetProducts(int PageIndex, int PageSize);
        /// <summary>
        /// 根据产品ID获取产品信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<APIResult<int>> ProductInsert(ProductInsertDto entity);
        /// <summary>
        /// 获取所有商品
        /// </summary>
        /// <returns></returns>
        Task<APIResult<List<Goods>>> GetGoods();
        /// <summary>
        /// 根据产品ID获取产品信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<APIResult<int>> ProductUpdate(int id);

        /// <summary>
        /// 根据产品ID获取产品信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<APIResult<int>> ProductUpdate(ProductUpdateDto entity);
        /// <summary>
        /// 根据产品ID获取产品信息和商品名称
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<APIResult<List<ProductDto>>> GetProductAndGoodsName(int id);
        /// <summary>
        /// 新增养殖信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<APIResult<int>> CultivationInsert(CultivationInsertDto entity);
        /// <summary>
        /// 屠宰更新
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<APIResult<int>> CultivationUpdate(CultivationUpdateDto entity);
        /// <summary>
        ///  免疫信息查询所有
        /// </summary>
        /// <returns></returns>
        Task<APIResult<List<Immunity>>> GetImmunity();
        /// <summary>
        /// 根据商品编号查询养殖信息
        /// </summary>
        /// <param name="productCode"></param>
        /// <returns></returns>
        Task<APIResult<List<Cultivation>>> GetCultivationByProductCode(string productCode);

        /// <summary>
        /// 添加免疫信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<APIResult<int>> ImmunityInsert(ImmunityInsertDto entity);
        /// <summary>
        /// 根据商品编号查询企业信息
        /// </summary>
        /// <param name="productCode"></param>
        /// <returns></returns>
        Task<APIResult<List<Enterprise>>> GetEnterpriseByProductCode(string productCode);
        /// <summary>
        /// 根据商品编号查询屠宰信息
        /// </summary>
        /// <param name="productCode"></param>
        /// <returns></returns>
        Task<APIResult<List<Slaughter>>> GetSlaughterByProductCode(string productCode);
        /// <summary>
        /// 屠宰信息添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
       Task<APIResult<int>> SlaughterInsert(SlaughterInsertDto entity);
        /// <summary>
        /// 企业信息添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<APIResult<int>> EnterpriseInsert(EnterpriseInsertDto entity);
        /// <summary>
        /// 深加工企业信息添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<APIResult<int>> MachiningEnterpriseInsert(MachiningEnterpriseInsertDto entity);
        /// <summary>
        /// 根据商品编号查询深加工
        /// </summary>
        /// <param name="productCode"></param>
        /// <returns></returns>
       Task<APIResult<List<MachiningEnterprise>>> GetMachiningEnterpriseByProductCode(string productCode);
        /// <summary>
        /// 根据商品编号查询原料信息
        /// </summary>
        /// <param name="productCode"></param>
        /// <returns></returns>
         Task<APIResult<List<Material>>> GetMaterialByProductCode(string productCode);

        /// <summary>
        /// 根据商品编号查询辅料
        /// </summary>
        /// <param name="productCode"></param>
        /// <returns></returns>
        Task<APIResult<List<Accessories>>> GetAccessoryByProductCode(string productCode);

        /// <summary>
        /// 根据商品编号查询添加剂信息
        /// </summary>
        /// <param name="productCode"></param>
        /// <returns></returns>
         Task<APIResult<List<Additive>>> GetAdditiveByProductCode(string productCode);

        /// <summary>
        /// 根据商品编号查询包材信息
        /// </summary>
        /// <param name="productCode"></param>
        /// <returns></returns>
         Task<APIResult<List<PackeMaterial>>> GetPackingByProductCode(string productCode);
    }
}


